package com.maimao.kill.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.kill.client.fallback.UploadFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/22 7:54 下午
 */
@RequestMapping("/upload")
@FeignClient(value = ServiceContainer.UPLOAD_SERVICE, fallbackFactory = UploadFallBackFactory.class, configuration = FeignInterceptor.class)
public interface UploadClient {

    /**
     * 批量删除图片
     * @param urls 图片地址
     */
    @PostMapping("/delete/batch")
    void deleteBatch(@RequestBody List<String> urls);
}
